Computer systems typically comprise a combination of computer programs and hardware, such as semiconductors, transistors, chips, circuit boards, memory, storage devices, and processors. The computer programs are stored in the memory and/or storage devices and are executed by the processors. Fundamentally, computer systems are used for the storage, manipulation, and analysis of data, which is stored in the memory and/or storage devices.
Computer systems may have multiple hierarchies of directly addressable memory types with different properties. Examples of memory types include PCM (Phase Change Memory), NAND flash, NOR flash, and DRAM (Dynamic Random Access Memory). Examples of memory properties include cost per byte, persistence, latency, write endurance, erase time, write time, and memory wear (the upper limit of program/erase cycles). Computer systems may need to implement different functions in order to support different types of memory. For example, DRAM may allow a computer system write function to write bytes of memory without first erasing the memory while flash memory may require a write function to erase a block of data before the write function may rewrite bytes of the memory with new data. As another example, DRAM is volatile memory while PCM is persistent or non-volatile memory, so a function that writes a record to a database table in DRAM may choose to always save the contents of the record to secondary storage, but a function that writes a record to a database table in PCM may choose to save the contents of the record to secondary storage only if the PCM is more than 90% full.